-- GENERATED SPELL FOR [Bash'ir Arcanist] --


function spell0_22243(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22243', 609, 1)
end

function spell1_22243(pUnit, Event) --@Energy Surge,n/a--
pUnit:FullCastSpellOnTarget(36508,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22243', 5000, 1)
end

function Sorts_22243(pUnit, Event)
local choix_sorts_22243 = math.random(0, 1)
if choix_sorts_22243 == 0 then
pUnit:RegisterEvent('spell0_22243', 1, 1)
end
if choix_sorts_22243 == 1 then
pUnit:RegisterEvent('spell1_22243', 1, 1)
end
end

function mob22243_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22243', math.random(1500, 3000), 1)
end

function mob22243_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22243_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22243_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22243, 1, 'mob22243_Action')
RegisterUnitEvent(22243, 2, 'mob22243_Leave')
RegisterUnitEvent(22243, 3, 'mob22243_Kill')
RegisterUnitEvent(22243, 4, 'mob22243_Die')
